using System;
using System.Collections.Generic;
using System.Text;

namespace Workflows.Components
{
    /// <summary></summary>
    [Serializable]
    public class WorkflowInstance
    {
        private Guid _WorkflowInstanceID;
        private Guid _WorkflowID;       // points to workflowdesign
        private bool _IsActive;
        private Guid _TriggerID;
        private string _AuthorEmailAddress;
        private bool _HasError;

        #region props
        /// <summary></summary>
        public Guid WorkflowInstanceID
        {
            get
            {
                return this._WorkflowInstanceID;
            }
            set
            {
                this._WorkflowInstanceID = value;
            }
        }

        /// <summary></summary>
        public Guid WorkflowID
        {
            get { return _WorkflowID; }
            set { _WorkflowID = value; }
        }

        /// <summary></summary>
        public bool IsActive
        {
            get { return _IsActive; }
            set { _IsActive = value; }
        }

        /// <summary></summary>
        public Guid WorkflowTriggerID
        {
            get { return _TriggerID; }
            set { _TriggerID = value; }
        }

        /// <summary></summary>
        public string AuthorEmailAddress
        {
            get { return _AuthorEmailAddress; }
            set { _AuthorEmailAddress = value; }
        }

        /// <summary></summary>
        public bool HasError
        {
            get { return _HasError; }
            set { _HasError = value; }
        }

       
        #endregion

        /// <summary></summary>
        public WorkflowInstance()
        {
            this._AuthorEmailAddress = string.Empty;
            this._HasError = false;
            this._IsActive = false;
            this._TriggerID = Guid.Empty;
            this._WorkflowID = Guid.Empty;
            this._WorkflowInstanceID = Guid.NewGuid();
        }

    }
}
